<template>
  <div class="about">
    <h1>This is an about page</h1>
    <button @click="sendAxios">发出 axios请求</button>

    <ul>
      <li v-for="brand in brandList" :key="brand.id">
        {{ brand.brandName }}  , {{ brand.companyName }}
      </li>
    </ul>
  </div>
</template>


<script>
export default {
  data() {
    return {
      brandList: [],
    }
  },
  methods: {
    sendAxios: async function() {
      // this.$http  = axios
      let result = await this.$http.get('/brand/selectAll')
      console.log(result)
      this.brandList = result
    }

  },
  
}
</script>
